package com.tcs.startup;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
* @Title: StartUp.java
* @Package com.tcs.startup
* @author 神经刀
* @date 2018年7月28日
* @version V1.0
 */
public class StartUp {
	
	private static final Logger logger = LoggerFactory.getLogger(StartUp.class);
	
	private static Object lock = new Object();
	
	public static void main(String[] args) {
		@SuppressWarnings("resource")
		ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:spring/proxypoll.xml");
		applicationContext.registerShutdownHook();
		synchronized (lock) {
			try {
				lock.wait();
			} catch (InterruptedException e) {
				logger.error("" , e);
			}
		}
	}
}